<% // Copyright 2008 Carnegie Mellon University
// Licensed under the Apache License, Version 2.0 (the "License"); 
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//  
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, 
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License. %>
<%@page language="java" contentType="text/html; charset=UTF-8" %>
<%@page pageEncoding="UTF-8" %>
<%@page import="edu.cmu.lti.sepia.servlet.SessionObserver"%>

<% 
response.setHeader("progma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
request.setCharacterEncoding("UTF-8");
int sessionUsers = SessionObserver.getSessionCount();

String projectName = (String)application.getAttribute("projectName");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="no-cache" http-equiv="Cache-Control">
<title>SEPIA - Standard Evaluation Package for Information Access</title>
<link rel="stylesheet" href="css/common.css" type="text/css" />
<link rel="stylesheet" href="css/top.css" type="text/css" />
<script type="text/javascript" src="js/external/jquery.js"></script>
<script type="text/javascript"><!-- jQuery.noConflict(); //--></script>
<script type="text/javascript" src="js/external/prototype.js"></script>
<script type="text/javascript" src="js/resources.js.jsp?taskNameShort=none"></script>
<script type="text/javascript" src="js/shared.js"></script>
<script type="text/javascript" src="js/top.js"></script>
<!-- <script type="text/javascript" src="js/top_googlechart.js.jsp"></script> -->
</head>

<body onload="init(lang);">

<!-- HEADER -->
<div id="header"></div>

<br>
<div align="center"><h2>SEPIA for <%=projectName.toUpperCase()%></h2></div>

<form action="task_menu.jsp" method="post" name="task_selection">
<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td valign="top">
      <fieldset style="width:400px;height:250px;margin-right:15px">
        <legend id="msg_select_task"></legend>
        <select id="taskList" name="taskNameShort" onchange="selectTask()"><option>loading...</option></select>
        &nbsp;<input id="msg_select" value=" submit " type="submit" disabled><br>
        <div id="taskDetail" style="padding-top:10px;"></div>
      </fieldset>
    </td>
    <td valign="top">
      <fieldset style="height:250px;align:center">
        <legend id="msg_admin_menu"></legend>
        <input id="msg_tm" onclick="top.location.href='admin/task_manager.html'" class="admin_button" type="button" value="Task Manager" disabled><br>
        <input id="msg_um" onclick="top.location.href='admin/user_manager.html'" class="admin_button" type="button" value="User Manager" disabled><br>
        <input id="msg_pm" onclick="top.location.href='admin/permission_manager.jsp'" class="admin_button" type="button" value="Permission Manager" disabled><br>

        <input id="msg_log_browser" onclick="top.location.href='organizer/log_browser.jsp'" class="admin_button" type="button" value="Log Browser" disabled><br>
        <input id="msg_exporter" onclick="top.location.href='organizer/admin_exporter.jsp'" class="admin_button" type="button" value="Export" disabled><br>
        <!-- <input id="msg_upload_status" onclick="top.location.href='organizer/upload_status.jsp'" class="admin_button" type="button" value="Upload Status Browser" disabled><br>-->
        <input id="msg_file_manager" onclick="top.location.href='organizer/file_manager.html'" class="admin_button" type="button" value="File Manager" disabled><br>
        <input id="msg_progress_browser" onclick="top.location.href='organizer/progress_browser.jsp'" class="admin_button" type="button" value="Progress Browser" disabled><br>
        <input id="msg_user_stat" onclick="top.location.href='organizer/user_stat_browser.jsp'" class="admin_button" type="button" value="User Statistics" disabled><br>
      </fieldset>
    </td>
  </tr>
  <tr><td colspan="2">
    <fieldset style="height:70px;padding-top:0px;margin-top:0px">
      <legend id="msg_preferences"></legend>
      <span id="msg_disp_lang"></span>: 
      <select onchange="setDisplayLanguage(this.value)" name="displayLang" id="displayLangList">
        <option value="CS">CS</option>
        <option value="CT">CT</option>
        <option value="EN">EN</option>
        <option value="JA">JA</option>
      </select>
    </fieldset>
  </td></tr>
  <tr><td colspan="2">
  <br><%="Currently, "+(sessionUsers>1?(sessionUsers+" people are logged in."):" no other people are logged in.")%>
  </td>
</table>
</form>

<!-- FOOTER -->
<div id="footer"></div>

</body>
</html>
